<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The AMQPConnection class</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="amqp.examples.html">范例</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="amqpconnection.connect.html">AMQPConnection::connect</a></div>
 <div class="up"><a href="book.amqp.html">AMQP</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="class.amqpconnection" class="reference">

 <h1 class="title">The AMQPConnection class</h1>
 

 <div class="partintro"><p class="verinfo">(PECL amqp &gt;= Unknown)</p>


  <div class="section" id="amqpconnection.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    Represents a connection to an AMQP broker.
   </p>
  </div>


  <div class="section" id="amqpconnection.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <strong class="classname">AMQPConnection</strong>
     </span>
     {</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Methods */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="amqpconnection.connect.html" class="methodname">connect</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="amqpconnection.construct.html" class="methodname">__construct</a></span>
    ([ <span class="methodparam"><span class="type">array</span> <code class="parameter">$credentials</code><span class="initializer"> = array()</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="amqpconnection.disconnect.html" class="methodname">disconnect</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="amqpconnection.gethost.html" class="methodname">getHost</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="amqpconnection.getlogin.html" class="methodname">getLogin</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="amqpconnection.getpassword.html" class="methodname">getPassword</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="amqpconnection.getport.html" class="methodname">getPort</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="amqpconnection.gettimeout.html" class="methodname">getTimeout</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="amqpconnection.getvhost.html" class="methodname">getVhost</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="amqpconnection.isconnected.html" class="methodname">isConnected</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="amqpconnection.reconnect.html" class="methodname">reconnect</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="amqpconnection.sethost.html" class="methodname">setHost</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$host</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="amqpconnection.setlogin.html" class="methodname">setLogin</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$login</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="amqpconnection.setpassword.html" class="methodname">setPassword</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$password</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="amqpconnection.setport.html" class="methodname">setPort</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$port</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="amqpconnection.settimeout.html" class="methodname">setTimeout</a></span>
    ( <span class="methodparam"><span class="type">float</span> <code class="parameter">$timeout</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="amqpconnection.setvhost.html" class="methodname">setVhost</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$vhost</code></span>
   )</div>

   }</div>


  </div>

 </div>

 





















 






 







 





 






 






 
































































<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="amqpconnection.connect.html">AMQPConnection::connect</a> — Establish a connection with the AMQP broker.</li><li><a href="amqpconnection.construct.html">AMQPConnection::__construct</a> — Create an instance of AMQPConnection</li><li><a href="amqpconnection.disconnect.html">AMQPConnection::disconnect</a> — Closes the connection with the AMQP broker.</li><li><a href="amqpconnection.gethost.html">AMQPConnection::getHost</a> — Get the configured host</li><li><a href="amqpconnection.getlogin.html">AMQPConnection::getLogin</a> — Get the configured login</li><li><a href="amqpconnection.getpassword.html">AMQPConnection::getPassword</a> — Get the configured password</li><li><a href="amqpconnection.getport.html">AMQPConnection::getPort</a> — Get the configured port</li><li><a href="amqpconnection.gettimeout.html">AMQPConnection::getTimeout</a> — Get the configured timeout</li><li><a href="amqpconnection.getvhost.html">AMQPConnection::getVhost</a> — Get the configured vhost</li><li><a href="amqpconnection.isconnected.html">AMQPConnection::isConnected</a> — Determine if the AMQPConnection object is connected to the broker.</li><li><a href="amqpconnection.reconnect.html">AMQPConnection::reconnect</a> — Closes any open connection and creates a new connection with the AMQP broker.</li><li><a href="amqpconnection.sethost.html">AMQPConnection::setHost</a> — Set the amqp host.</li><li><a href="amqpconnection.setlogin.html">AMQPConnection::setLogin</a> — Set the login.</li><li><a href="amqpconnection.setpassword.html">AMQPConnection::setPassword</a> — Set the password.</li><li><a href="amqpconnection.setport.html">AMQPConnection::setPort</a> — Set the port.</li><li><a href="amqpconnection.settimeout.html">AMQPConnection::setTimeout</a> — Set the timeout.</li><li><a href="amqpconnection.setvhost.html">AMQPConnection::setVhost</a> — Set the amqp virtual host</li></ul>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="amqp.examples.html">范例</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="amqpconnection.connect.html">AMQPConnection::connect</a></div>
 <div class="up"><a href="book.amqp.html">AMQP</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
